//
//  ClassifyModelFirstData.m
//  XYFMApp
//
//  Created by 岁变 on 16/9/9.
//  Copyright © 2016年 岁变. All rights reserved.
//

#import "ClassifyModelFirstData.h"
#import "XYMacro.h"

@implementation ClassifyModelFirstData

- (void)setValue:(id)value forKey:(NSString *)key {
    if ([key isEqualToString:@"top_musics"]) {
        NSMutableArray *mArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ClassifyModelFirstTopMusics *model = [ClassifyModelFirstTopMusics modelWithDictionary:dic];
            [mArr addObject:model];
        }
        _top_musics = mArr;
    }
    if ([key isEqualToString:@"top_items"]) {
        NSMutableArray *mArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ClassifyModelFirstTopItems *model = [ClassifyModelFirstTopItems modelWithDictionary:dic];
            [mArr addObject:model];
        }
        _top_items = mArr;
    }
    if ([key isEqualToString:@"new_musics"]) {
        NSMutableArray *mArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ClassifyModelFirstNewMusics *model = [ClassifyModelFirstNewMusics modelWithDictionary:dic];
            [mArr addObject:model];
        }
        _newest_music = mArr;
    }
    if ([key isEqualToString:@"cat_list"]) {
        NSMutableArray *mArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ClassifyModelFirstCatList *model = [ClassifyModelFirstCatList modelWithDictionary:dic];
            [mArr addObject:model];
        }
        _cat_list = mArr;
    }
    
    
}

@end
